package beans;

import java.util.HashMap;
import java.util.Map;

//import engine.BIEngine0_0_2.TaskThread;
import engine.BIEngine0_1.TaskThread;

public enum RunningTask {
	TASKMAP;
	private Map<String, TaskThread> taskMap;

	RunningTask() {
		this.taskMap = new HashMap<>();
	}

	public TaskThread getTask(String taskHash) {
		return this.taskMap.get(taskHash);
	}
	public void removeTask(String taskHash) {
		if(this.taskMap.containsKey(taskHash))
		{
			this.taskMap.remove(taskHash);
		}
	}

	public static void main(String[] args) {
	}

	public Map<String, TaskThread> getTaskMap(){
		return this.taskMap;
	}
	public void setTask(String taskHash,TaskThread task) {
		this.taskMap.put(taskHash, task);
	}
}
